﻿using Collab.Services.Remote.WebserviceProxy;

namespace Collab.Modules.ContactBrowser.ViewModel
{
    public class MainViewModel : ViewModel
    {
        private IRepository repository;

        public ViewModel CurrentViewModel { get; set; }

        public MainViewModel()
        {
            repository = new Repository();
            CurrentViewModel = new LoginViewModel(repository, this);
        }

        #region Navigation

        public void NavigateToContactsView(string username)
        {
            CurrentViewModel = new ContactsViewModel(username, repository, this);
            NotifyPropertyChanged("CurrentViewModel");
        }

        #endregion
    }
}
